package com.harry.hr.web.struts.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;

import com.harry.hr.biz.ConfigFileBIZ;
import com.harry.hr.web.struts.form.EngageMajorReleaseForm;

public class EngageMajorReleaseAction extends DispatchAction {

	private ConfigFileBIZ configFileBIZ;

	public void setConfigFileBIZ(ConfigFileBIZ configFileBIZ) {
		this.configFileBIZ = configFileBIZ;
	}
	
	public ActionForward prepareEngagePage(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		EngageMajorReleaseForm engageMajorReleaseForm = (EngageMajorReleaseForm)form;
		engageMajorReleaseForm.setFirstKinds(this.configFileBIZ.getConfigFileFirstKindList());
		engageMajorReleaseForm.setMajorKinds(this.configFileBIZ.getConfigMajorKindList());
		engageMajorReleaseForm.setEngageTypes(this.configFileBIZ.getEngageTypes());
		return mapping.findForward("prepareEngagePage");
	}
}
